﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using MySql.Data.MySqlClient;

namespace MovieSystem.Banco
{
    public class EntConexao
    {
        public static MySqlConnection bdConn = new MySqlConnection(" Persist Security Info=False;server=localhost;database=moviesystem;uid=root;server=localhost;database=moviesystem;uid=root;pwd="); //MySQL
        private MySqlDataAdapter bdAdapter;
        private DataSet bdDataSet; //MySQL
  
        public static Boolean AbrirConexao()
        {
            //Abre conecção
            try{
 	            bdConn.Open();

            }
            catch{
                return false;
            }

                return true;
        }

        public static Boolean FecharConexao()
        {
            //Abre conecção
            try{
 	            bdConn.Close();
            }
            catch{
                return false;
            }

            return true;
        }

    }
}
